package com.wufun.overseas.adapters;

import android.content.Context;
import android.util.Log;
import android.view.ViewGroup;

import com.wufun.overseas.models.bean.GameTransferBean;
import com.wufun.overseas.view.GameTransferHistoryListItem;

/**
 * Author: hest
 * Date:  2016/5/5
 * 面传中游戏记录适配器
 */
public class GameTransferHistoryAdapter extends RecyclerViewBaseAdapter<GameTransferBean, GameTransferHistoryListItem> {
    private static final String TAG = GameTransferHistoryAdapter.class.getSimpleName();

    public GameTransferHistoryAdapter(Context mContext) {
        this.mContext = mContext;
    }

    @Override
    protected GameTransferHistoryListItem onCreateItemView(ViewGroup parent, int viewType) {
        Log.d(TAG, "onCreateItemView: ");
        return new GameTransferHistoryListItem(mContext);
    }

    @Override
    public void onBindViewHolder(ViewWrapper<GameTransferHistoryListItem> holder, int position) {
        if (holder instanceof ViewWrapper) {
            Log.d(TAG, "onBindViewHolder: position" + position);
            GameTransferHistoryListItem item = holder.getView();
            GameTransferBean bean = arrys.valueAt(position);
            item.bind(bean);
        }
    }
}
